/**
 * 
 */
package dms.dto;

import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * @author lrz
 *
 */
public class StudentDTO extends ActionForm {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Long id;
	private Long dormitory;
	private String building;
	private Long school;
	private Long faculty;
	private String gender;
	//账户名
	private String name;
	//真实姓名
	private String realName;
	private Long classes;
	private String passwordQuestion;
	private String passwordAnswer;
	private String studentNumber;
	private Date modifyDate;
	private Date registerDate;
	
	//在修改学生修改自己信息时用
	protected String oldPassword;
	protected String password;
	
	//在修改学生修改自己信息时用
	protected String oldEmail;
	protected String email;
	protected String telephone;
	
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * @return the dormitory
	 */
	public Long getDormitory() {
		return dormitory;
	}
	/**
	 * @param dormitory the dormitory to set
	 */
	public void setDormitory(Long dormitory) {
		this.dormitory = dormitory;
	}
	/**
	 * @return the school
	 */
	public Long getSchool() {
		return school;
	}
	/**
	 * @param school the school to set
	 */
	public void setSchool(Long school) {
		this.school = school;
	}
	/**
	 * @return the faculty
	 */
	public Long getFaculty() {
		return faculty;
	}
	/**
	 * @param faculty the faculty to set
	 */
	public void setFaculty(Long faculty) {
		this.faculty = faculty;
	}
	/**
	 * @return the gender
	 */
	public String getGender() {
		return gender;
	}
	/**
	 * @param gender the gender to set
	 */
	public void setGender(String gender) {
		this.gender = gender;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the classes
	 */
	public Long getClasses() {
		return classes;
	}
	/**
	 * @param classes the classes to set
	 */
	public void setClasses(Long classes) {
		this.classes = classes;
	}
	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}
	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	/**
	 * @return the passwordQuestion
	 */
	public String getPasswordQuestion() {
		return passwordQuestion;
	}
	/**
	 * @param passwordQuestion the passwordQuestion to set
	 */
	public void setPasswordQuestion(String passwordQuestion) {
		this.passwordQuestion = passwordQuestion;
	}
	/**
	 * @return the passwordAnswer
	 */
	public String getPasswordAnswer() {
		return passwordAnswer;
	}
	/**
	 * @param passwordAnswer the passwordAnswer to set
	 */
	public void setPasswordAnswer(String passwordAnswer) {
		this.passwordAnswer = passwordAnswer;
	}
	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}
	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}
	/**
	 * @return the studentNumber
	 */
	public String getStudentNumber() {
		return studentNumber;
	}
	/**
	 * @param studentNumber the studentNumber to set
	 */
	public void setStudentNumber(String studentNumber) {
		this.studentNumber = studentNumber;
	}
	/**
	 * @return the modifyDate
	 */
	public Date getModifyDate() {
		return modifyDate;
	}
	/**
	 * @param modifyDate the modifyDate to set
	 */
	public void setModifyDate(Date modifyDate) {
		this.modifyDate = modifyDate;
	}
	/**
	 * @return the registerDate
	 */
	public Date getRegisterDate() {
		return registerDate;
	}
	/**
	 * @param registerDate the registerDate to set
	 */
	public void setRegisterDate(Date registerDate) {
		this.registerDate = registerDate;
	}
	/**
	 * @return the telephone
	 */
	public String getTelephone() {
		return telephone;
	}
	/**
	 * @param telephone the telephone to set
	 */
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	/**
	 * @return the oldPassword
	 */
	public String getOldPassword() {
		return oldPassword;
	}
	/**
	 * @param oldPassword the oldPassword to set
	 */
	public void setOldPassword(String oldPassword) {
		this.oldPassword = oldPassword;
	}
	/**
	 * @return the oldEmail
	 */
	public String getOldEmail() {
		return oldEmail;
	}
	/**
	 * @param oldEmail the oldEmail to set
	 */
	public void setOldEmail(String oldEmail) {
		this.oldEmail = oldEmail;
	}
	public String getRealName() {
		return realName;
	}
	public void setRealName(String realName) {
		this.realName = realName;
	}
	public String getBuilding() {
		return building;
	}
	public void setBuilding(String building) {
		this.building = building;
	}
	
	
	
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		
		this.building = null;
		this.classes = null;
		this.dormitory = null;
		this.email = null;
		this.faculty = null;
		this.gender = null;
		this.id = null;
		this.modifyDate = null;
		this.name = null;
		this.oldEmail = null;
		this.oldPassword = null;
		this.password = null;
		this.passwordAnswer = null;
		this.passwordQuestion = null;
		this.realName = null;
		this.registerDate = null;
		this.school = null;
		this.studentNumber = null;
		this.telephone = null;	
	}

	@Override
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		// TODO 学生创建的validate方法
		return super.validate(mapping, request);
	}
	
}
